﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.IO;
using PhotoGallery.BLL;
using PhotoGallery.DLL;
using PhotoGallery.Model;
public partial class admin_personal : System.Web.UI.Page
{
    protected void Page_Load(object sender, EventArgs e)
    {
        User u = (User)Session["user"];
        if (u == null) Response.Redirect("login.aspx");
        
    }
    protected void changePwd_Click(object sender, EventArgs e)
    {
        string password = Get_MD5(this.userpasswd.Text);
        UserAction pa = new UserAction();
        pa.changePwd(((User)Session["user"]).Uid, password);
        Response.Redirect("login.aspx");
    }
    public string Get_MD5(string strSource)
    {
        return System.Web.Security.FormsAuthentication.HashPasswordForStoringInConfigFile(strSource, "MD5");
    }
}